<!--
    -  Copyright (c) 2018-2025, haohanwork.com All rights reserved.
  -->
  <avue-form v-model="form" :option="option" @submit="submit"></avue-form>
<template>
  <div class="execution">
    <template>
      <el-table :data="tableData" border style="width: 100%">
        <el-table-column fixed prop="productName" label="商品名称"></el-table-column>
        <el-table-column prop="goodsModelId" label="商品编码"></el-table-column>
        <el-table-column prop="supply" label="仓库"></el-table-column>
        <el-table-column prop="unit" label="单位"></el-table-column>
        <el-table-column prop="productNumber" label="现有库存"></el-table-column>
      </el-table>
    </template>
    <template>
      <div class="return-btn">
        <el-button type="primary" plain @click="backup">返回</el-button>
      </div>
    </template>
  </div>
</template>
<script>
import {
  getDetail
} from "@/api/scm/warehouse/outstorage";
import { tableOption } from "@/const/crud/scm/warehouse/outstorage";
import { mapGetters } from "vuex";

export default {
  name: "order",
  data() {
    return {
      form: {
        datetime: "1398250549123" //时间戳例子
      },
      option: {
        labelWidth: 110,
        column: []
      },
      formInline: {
        user: "",
        region: ""
      },
      tableData: [],
      page: {
        total: 0, // 总页数
        currentPage: 1, // 当前页数
        pageSize: 20 // 每页显示多少条
      },
      tableLoading: false,
      tableOption: tableOption
    };
  },
  computed: {
    ...mapGetters(["permissions"]),
    permissionList() {
      return {
        addBtn: this.vaildData(
          this.permissions.purchase_purchasetask_add,
          true
        ),
        delBtn: this.vaildData(
          this.permissions.purchase_purchasetask_del,
          true
        ),
        editBtn: this.vaildData(
          this.permissions.purchase_purchasetask_edit,
          true
        )
      };
    }
  },
  created(){
    this.init();
  },
  methods: {
    init(){
      let params = this.$route.query;
      getDetail(params).then(res => {
        this.tableData = res.data.data;
      })
    },
    backup:function () {
      this.$router.go(-1);
    }
  }
};
</script>

<style lang="scss" scoped>
  .avue-view{
    margin: 20px;
    background-color: #ffff;
    padding: 20px;
    border-radius: 6px;
  }
</style>
